<template>
  <div id="neiron">
    <van-loading size="24px" v-show="loading" v-if="loading"
      >加载中...</van-loading
    >
    <div class="nrml" v-for="item in neiron" :key="item.id" v-else>
      <div class="zuo">
        <router-link to="/Xiangqingye">
          <b>{{ item.name }}</b>
          <p>{{ item.name2 }}</p>
        </router-link>
      </div>
      <div class="you">
        <img :src="item.img" alt="" />
      </div>
    </div>

    <!-- <div class="nrml">
      <div class="zuo">
        <b>@学生党别再“中招”!公安部为你揭秘5种诈骗手段</b>
        <p>国家反诈中心 2021-12-26</p>
      </div>
      <div class="you">
        <img src="../assets/imgs/03.png" alt="" />
      </div>
    </div>
     <div class="nrml">
      <div class="zuo">
        <b>刷单诈骗3.0:营造“抢单”火爆氛围，鼓吹拉新...</b>
        <p>国家反诈中心 2021-12-23</p>
      </div>
      <div class="you">
        <img src="../assets/imgs/04.png" alt="" />
      </div>
    </div>
     <div class="nrml">
      <div class="zuo">
        <b>凡是刷单的都是诈骗，千万别上当！</b>
        <p>国家反诈中心 2021-12-22</p>
      </div>
      <div class="you">
        <img src="../assets/imgs/05.png" alt="" />
      </div>
    </div>
    <div class="nrml">
      <div class="zuo">
        <b>全名总动员，重庆筑牢反诈堡垒</b>
        <p>国家反诈中心 2021-12-15</p>
      </div>
      <div class="you">
        <img src="../assets/imgs/07.png" alt="" />
      </div>
    </div>
  -->
    <div class="gengduoneiron">
      <div class="neirong">
        <p>更多内容</p>
        <!-- <p>国家反诈中心 2021-12-15</p> -->
      </div>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      neiron: [],
      loading: false,
    };
  },
  created() {
    this.getneiron();
  },
  methods: {
    getneiron() {
      this.loading = true;
      axios({
        url: "http://localhost:3000/neiron",
      }).then((res) => {
        // 把后端的数据赋给了navlist
        // console.log(res.data);
        this.neiron = res.data;
        console.log(this.neiron, "this.neiron");
        setTimeout(() => {
          this.loading = false;
        }, 2000);
      });
    },
  },
};
</script>

<style>
#neiron {
  height: 40rem;
  display: flex;
  flex-direction: column;
}
.nrml {
  height: 8rem;
  border-bottom: 1px solid rgb(82, 80, 80);

  display: flex;
  align-items: center;
  justify-content: space-around;
}

.zuo {
  width: 55%;
  height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.zuo a {
  text-decoration: none;
  font-size: 18px;
  display: inline-block;
  color: #000;
}
 #neiron .you {
  width: 40%;
  height: 5.5rem;
  display: flex;
}

#neiron .you img {
  width: 100%;
  height:100%;
  display: flex;
  align-items: center;
}

#neiron .nrml .zuo p:nth-child(2) {
  color: rgb(105, 105, 105);
  font-size: 14px;
}
.gengduoneiron .neirong {
  width: 100%;
  height: 8rem;
  padding-top: 25px;
  font-size: 18px;
  color: rgb(0, 38, 255);
  display: flex;
  justify-content: center;
}
</style>
